package com.hb.study.design_patterns.proxy.static_proxy;

import com.hb.study.design_patterns.proxy.IGamePlayer;

/**
 * 静态代理
 *
 * @author Mr.Huang
 * @version v0.1, StaticProxy.java, 2020/5/14 16:30, create by huangbiao.
 */
public class StaticProxy implements IGamePlayer {

    IGamePlayer iGamePlayer;

    public StaticProxy(IGamePlayer iGamePlayer) {
        this.iGamePlayer = iGamePlayer;
    }

    @Override
    public void login(String password) {
        iGamePlayer.login(password);
    }

    @Override
    public void killBoss() {
        iGamePlayer.killBoss();
    }

    @Override
    public void upgrade() {
        iGamePlayer.upgrade();
    }

}

    